package com.prs.crm.domain.cqunicom;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.hr.Person;

/**
 * @author WangTing
 * 
 *         创建时间：2011-3-4
 */

// ///////////////////// 商家管理

@Entity
@Table(name = "cq_company")
public class Company extends BaseEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	/**
	 * 
	 * 公司全称
	 */
	private String comName;

	/**
	 * 
	 * //服务类别
	 */
	private String comType;

	/**
	 * 
	 * //服务名称
	 */
	private String comServices;

	/**
	 * 
	 * //主要负责人
	 */
	private String officer;

	/**
	 * 
	 * //主要负责人电话
	 */
	private String Phone1;

	/**
	 * 
	 * //业务联系人
	 */

	private String linkman;

	/**
	 * 
	 * //业务联系人电话
	 */
	private String Phone2;

	/**
	 * 
	 * //业务联系人手机
	 */
	private String mobileNo;

	/**
	 * 
	 * //服务等级
	 */
	private String level;
	/**
	 * 登记排序
	 */
	@Column(columnDefinition = "Integer(22) default '0'")
	private Integer levels;
	/**
	 * 点击次数
	 */
	@Column(columnDefinition = "Integer(22) default '0'")
    private Integer clickTimes;
    /**
     *排序数字 
     */
	@Column(columnDefinition = "Integer(22) default '0'")
    private Integer sortNums;
    
	/**
	 * 
	 * //是否是短信商家
	 */

	private String state1;

	/**
	 * 
	 * //是否标记无效
	 */
	private String state2;

	/**
	 * 
	 * //标记时间
	 */

	private String dtime;

	/**
	 * 
	 * //所属地区
	 */
	private String area;

	/**
	 * 
	 * //公司地址
	 */
	private String address;

	/**
	 * 
	 * //注册序列号
	 */

	private String serial_number;

	/**
	 * 
	 * //服务列表
	 */

	private String servicelist;

	/**
	 * 
	 * 备注
	 */
	private String remark;

	/**
	 * 一个商家对应多个订单
	 * 
	 * @return
	 */
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "company")
	private Set<PoplarOrder> poplarOrder;

	/**
	 * 对账信息
	 */
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "companyy")
	private Set<OrderReconciliation> orderReconciliation;

	/**
	 * 转接对账信息
	 */
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "companyy")
	private Set<OrderConnecting> orderConnecting;

	/**
	 * 中间表
	 * 
	 * @return
	 */
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "companym")
	private Set<MidBusinessOrder> midBusinessOrder;
	/**
	 * 商家对应商家注册
	 * 
	 * @return
	 */
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "companys")
	private Set<Person> person;

	// 商家提醒
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "companyRemind")
	private Set<BusinessRemind> businessRemind;
	
	/**
	 * 商家类型
	 * 有：商家，订花，订票，订房，订餐
	 * @return
	 */
	private String comStyles;
	

	public String getComStyles() {
		return comStyles;
	}

	public void setComStyles(String comStyles) {
		this.comStyles = comStyles;
	}

	public Set<Person> getPerson() {
		return person;
	}

	public void setPerson(Set<Person> person) {
		this.person = person;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getComName() {
		return comName;
	}

	public void setComName(String comName) {
		this.comName = comName;
	}

	public String getComType() {
		return comType;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public Set<MidBusinessOrder> getMidBusinessOrder() {
		return midBusinessOrder;
	}

	public void setMidBusinessOrder(Set<MidBusinessOrder> midBusinessOrder) {
		this.midBusinessOrder = midBusinessOrder;
	}

	public void setComType(String comType) {
		this.comType = comType;
	}

	public String getComServices() {
		return comServices;
	}

	public void setComServices(String comServices) {
		this.comServices = comServices;
	}

	public String getOfficer() {
		return officer;
	}

	public void setOfficer(String officer) {
		this.officer = officer;
	}

	public String getPhone1() {
		return Phone1;
	}

	public void setPhone1(String phone1) {
		Phone1 = phone1;
	}

	public String getLinkman() {
		return linkman;
	}

	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}

	public String getPhone2() {
		return Phone2;
	}

	public void setPhone2(String phone2) {
		Phone2 = phone2;
	}

	public String getMobileNo() {
		return mobileNo;
	}

	public void setMobileNo(String mobileNo) {
		this.mobileNo = mobileNo;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public String getState1() {
		return state1;
	}

	public void setState1(String state1) {
		this.state1 = state1;
	}

	public String getState2() {
		return state2;
	}

	public void setState2(String state2) {
		this.state2 = state2;
	}

	public String getDtime() {
		return dtime;
	}

	public void setDtime(String dtime) {
		this.dtime = dtime;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getSerial_number() {
		return serial_number;
	}

	public void setSerial_number(String serial_number) {
		this.serial_number = serial_number;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Set<PoplarOrder> getPoplarOrder() {
		return poplarOrder;
	}

	public void setPoplarOrder(Set<PoplarOrder> poplarOrder) {
		this.poplarOrder = poplarOrder;
	}

	public Set<OrderReconciliation> getOrderReconciliation() {
		return orderReconciliation;
	}

	public void setOrderReconciliation(
			Set<OrderReconciliation> orderReconciliation) {
		this.orderReconciliation = orderReconciliation;
	}

	public String getServicelist() {
		return servicelist;
	}

	public void setServicelist(String servicelist) {
		this.servicelist = servicelist;
	}

	public Set<OrderConnecting> getOrderConnecting() {
		return orderConnecting;
	}

	public void setOrderConnecting(Set<OrderConnecting> orderConnecting) {
		this.orderConnecting = orderConnecting;
	}

	public Set<BusinessRemind> getBusinessRemind() {
		return businessRemind;
	}

	public void setBusinessRemind(Set<BusinessRemind> businessRemind) {
		this.businessRemind = businessRemind;
	}

	public Integer getLevels() {
		return levels;
	}

	public void setLevels(Integer levels) {
		this.levels = levels;
	}

	public Integer getClickTimes() {
		return clickTimes;
	}

	public void setClickTimes(Integer clickTimes) {
		this.clickTimes = clickTimes;
	}

	public Integer getSortNums() {
		return sortNums;
	}

	public void setSortNums(Integer sortNums) {
		this.sortNums = sortNums;
	}

	
}
